package com.zjt.web;

import com.zjt.service.IStaticParameterService;
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import com.zjt.entity.StaticParameter;
import java.util.List;
/**
 * LoginController负责打开登录页面(GET请求)和登录出错页面(POST请求)，
 * <p/>
 * 真正登录的POST请求由Filter完成,
 *
 * @author xueyanbeijing
 */
@Controller
@RequestMapping(value="/web/staticparameter")
public class StaticParameterController {
    private IStaticParameterService staticParameterService;
    @Autowired
    public void setStaticParameterService(IStaticParameterService staticParameterService) {
        this.staticParameterService = staticParameterService;
    }

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public String list(Model model) {
        List<StaticParameter> staticParameterList = staticParameterService.getStaticParameterList();
        model.addAttribute("parameterList",staticParameterList);
        return "staticparameter/parameterList";
    }
}
